import { IRoute } from 'umi-types';

export default [
  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/login',
          },
        ],
      },
      {
        path: '/',
        component: '../layouts/BasicLayout',
        routes: [
          {
            path: '/',
            redirect: '/welcome',
          },
          {
            path: '/welcome',
            name: 'welcome',
            icon: 'smile',
            component: './Account/Center',
            routes: [
              {
                path: '/welcome',
                redirect: '/welcome/articles',
              },
              {
                path: '/welcome/articles',
                component: './Account/Center/Articles',
              },
              {
                path: '/welcome/applications',
                component: './Account/Center/Applications',
              },
              {
                path: '/welcome/projects',
                component: './Account/Center/Projects',
              },
              {
                component: './404',
              },
            ],
          },
          {
            path: '/article',
            name: 'article',
            icon: 'read',
            routes: [
              {
                path: '/article/content',
                name: 'content',
                component: './article/content',
              },
              {
                path: '/article/editor',
                name: 'editor',
                component: './article/editor',
              },
              {
                component: './404',
              },
            ],
          },
          {
            path: '/Components',
            name: 'Components',
            icon: 'apartment',
            routes: [
              {
                path: '/Components/CustomTable',
                name: 'CustomTable',
                component: './Components/CustomTable',
              },
              {
                component: './404',
              },
            ],
          },
          {
            path: '/game',
            name: 'game',
            icon: 'reddit',
            routes: [
              {
                path: '/game/demo',
                name: 'demo',
                component: './game/demo',
              },
              {
                path: '/game/snake',
                name: 'Snake',
                component: './game/snake',
              },
              {
                path: '/game/TetrisLike',
                name: 'TetrisLike',
                component: './game/TetrisLike',
              },
              {
                component: './404',
              },
            ],
          },
          {
            path: '/radio',
            name: 'radio',
            icon: 'customer-service',
            // component: '../layouts/SecurityLayout',
            // authority: ['admin'],
            routes: [
              {
                path: '/radio/personal',
                name: 'personal',
                component: './radio/personal',
                authority: ['admin'],
              },
              {
                path: '/radio/internet',
                name: 'internet',
                component: './radio/internet',
                // authority: ['admin'],
              },
              {
                component: './404',
              },
            ],
          },
          {
            component: './404',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
] as IRoute[];
